package com.octopus.yangj.customized.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMapping;

import com.octopus.kernal.controller.AbstractCustomizedController;
import com.octopus.yangj.generated.controller.SearchEmployeeRoleCommand;
import com.octopus.yangj.generated.model.EmployeeRoleStruct;
import com.octopus.yangj.generated.service.EmployeeRoleService;

@Controller
@RequestMapping("/role/x")
public class CustomizedEmployeeRoleController extends AbstractCustomizedController<EmployeeRoleStruct, SearchEmployeeRoleCommand, Long>{
	
    @Autowired
    protected EmployeeRoleService roleService;

	@Override
	public String delete(Model model, HttpServletRequest request, Long id) {
    	Assert.isTrue( id != 1, "Cannot delete user role" );
        Assert.isTrue( id != 2, "Cannot delete admin role" );
		return null;
	}

}
